'\" t
.TH "UDEV_MONITOR_RECEIVE_DEVICE" "3" "" "systemd 257.1" "udev_monitor_receive_device"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
udev_monitor_receive_device, udev_monitor_enable_receiving, udev_monitor_set_receive_buffer_size, udev_monitor_get_fd, udev_monitor_get_udev \- Query and modify device monitor
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include <libudev\&.h>
.fi
.ft
.HP \w'struct\ udev_device\ *udev_monitor_receive_device('u
.BI "struct udev_device *udev_monitor_receive_device(struct\ udev_monitor\ *" "udev_monitor" ");"
.HP \w'int\ udev_monitor_enable_receiving('u
.BI "int udev_monitor_enable_receiving(struct\ udev_monitor\ *" "udev_monitor" ");"
.HP \w'int\ udev_monitor_set_receive_buffer_size('u
.BI "int udev_monitor_set_receive_buffer_size(struct\ udev_monitor\ *" "udev_monitor" ", int\ " "size" ");"
.HP \w'int\ udev_monitor_get_fd('u
.BI "int udev_monitor_get_fd(struct\ udev_monitor\ *" "udev_monitor" ");"
.HP \w'struct\ udev\ *udev_monitor_get_udev('u
.BI "struct udev *udev_monitor_get_udev(struct\ udev_monitor\ *" "udev_monitor" ");"
.SH "RETURN VALUE"
.PP
On success,
\fBudev_monitor_receive_device()\fR
returns a pointer to a newly referenced device that was received via the monitor\&. The caller is responsible to drop this reference when done\&. On failure,
\fBNULL\fR
is returned\&.
.PP
On success,
\fBudev_monitor_enable_receiving()\fR
and
\fBudev_monitor_set_receive_buffer_size()\fR
return an integer greater than, or equal to,
\fB0\fR\&. On failure, a negative error code is returned\&.
.PP
On success,
\fBudev_monitor_get_fd()\fR
returns the file descriptor used by this monitor\&. On failure, a negative error code is returned\&.
.PP
\fBudev_monitor_get_udev()\fR
always returns a pointer to the udev context that this monitor is associated with\&.
.SH "HISTORY"
.PP
\fBudev_monitor_receive_device()\fR,
\fBudev_monitor_enable_receiving()\fR,
\fBudev_monitor_set_receive_buffer_size()\fR,
\fBudev_monitor_get_fd()\fR, and
\fBudev_monitor_get_udev()\fR
were added in version 221\&.
.SH "SEE ALSO"
.PP
\fBudev_new\fR(3), \fBudev_device_new_from_syspath\fR(3), \fBudev_enumerate_new\fR(3), \fBudev_monitor_new_from_netlink\fR(3), \fBudev_monitor_filter_update\fR(3), \fBudev_list_entry\fR(3), \fBsystemd\fR(1)
